package com.jc.ds.model;

import java.math.BigDecimal;
import java.util.Date;

/**
 * user_order
 * @author 
 */
public class UserOrder extends BaseValueObject {
    private Long id;

    /**
     * 交易ID
     */
    private String orderId;

    private String sendUserId;

    private String sendUserVrtAddress;

    private String receiveUserId;

    private String receiveUserVrtAddress;

    private Date createTime;
    
    private Date endTime;

	/**
     * 交易状态 0 交易中   1 交易成功 2 交易失败
     */
    private Integer orderStatus;

    /**
     * 交易结果 
     */
    private String orderResult;

    /**
     * 交易类型 0 充值  1 提现
     */
    private Integer orderType;

    /**
     * 申请交易VRT金额 单位 个
     */
    private BigDecimal requestAmount;

    /**
     * 到账VRT金额
     */
    private BigDecimal resultAmount;

    /**
     * 链上扣费金额
     */
    private BigDecimal chainTaxAmount;

    /**
     * 平台扣费金额
     */
    private BigDecimal platfromTaxAmount;

    /**
     * 申请游戏币金额   充值申请换算为游戏币金额  提现申请换算为游戏币金额
     */
    private BigDecimal requestGameMoney;

    /**
     * 游戏渠道
     */
    private String channelCode;

    /**
     * 渠道订单ID
     */
    private String channelOrderId;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getSendUserId() {
        return sendUserId;
    }

    public void setSendUserId(String sendUserId) {
        this.sendUserId = sendUserId;
    }

    public String getSendUserVrtAddress() {
        return sendUserVrtAddress;
    }

    public void setSendUserVrtAddress(String sendUserVrtAddress) {
        this.sendUserVrtAddress = sendUserVrtAddress;
    }

    public String getReceiveUserId() {
        return receiveUserId;
    }

    public void setReceiveUserId(String receiveUserId) {
        this.receiveUserId = receiveUserId;
    }

    public String getReceiveUserVrtAddress() {
        return receiveUserVrtAddress;
    }

    public void setReceiveUserVrtAddress(String receiveUserVrtAddress) {
        this.receiveUserVrtAddress = receiveUserVrtAddress;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderResult() {
        return orderResult;
    }

    public void setOrderResult(String orderResult) {
        this.orderResult = orderResult;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public BigDecimal getRequestAmount() {
        return requestAmount;
    }

    public void setRequestAmount(BigDecimal requestAmount) {
        this.requestAmount = requestAmount;
    }

    public BigDecimal getResultAmount() {
        return resultAmount;
    }

    public void setResultAmount(BigDecimal resultAmount) {
        this.resultAmount = resultAmount;
    }

    public BigDecimal getChainTaxAmount() {
        return chainTaxAmount;
    }

    public void setChainTaxAmount(BigDecimal chainTaxAmount) {
        this.chainTaxAmount = chainTaxAmount;
    }

    public BigDecimal getPlatfromTaxAmount() {
        return platfromTaxAmount;
    }

    public void setPlatfromTaxAmount(BigDecimal platfromTaxAmount) {
        this.platfromTaxAmount = platfromTaxAmount;
    }

    public BigDecimal getRequestGameMoney() {
        return requestGameMoney;
    }

    public void setRequestGameMoney(BigDecimal requestGameMoney) {
        this.requestGameMoney = requestGameMoney;
    }

    public String getChannelCode() {
        return channelCode;
    }

    public void setChannelCode(String channelCode) {
        this.channelCode = channelCode;
    }

    public String getChannelOrderId() {
        return channelOrderId;
    }

    public void setChannelOrderId(String channelOrderId) {
        this.channelOrderId = channelOrderId;
    }

    public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

    
    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByOrderId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by order_id asc";
            }else{
                this.orderStr = this.orderStr + ",order_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by order_id desc";
            }else{
                this.orderStr = this.orderStr + ",order_id desc";
            }
        }
    }

    public void orderBySendUserId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by send_user_id asc";
            }else{
                this.orderStr = this.orderStr + ",send_user_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by send_user_id desc";
            }else{
                this.orderStr = this.orderStr + ",send_user_id desc";
            }
        }
    }

    public void orderBySendUserVrtAddress(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by send_user_vrt_address asc";
            }else{
                this.orderStr = this.orderStr + ",send_user_vrt_address asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by send_user_vrt_address desc";
            }else{
                this.orderStr = this.orderStr + ",send_user_vrt_address desc";
            }
        }
    }

    public void orderByReceiveUserId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by receive_user_id asc";
            }else{
                this.orderStr = this.orderStr + ",receive_user_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by receive_user_id desc";
            }else{
                this.orderStr = this.orderStr + ",receive_user_id desc";
            }
        }
    }

    public void orderByReceiveUserVrtAddress(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by receive_user_vrt_address asc";
            }else{
                this.orderStr = this.orderStr + ",receive_user_vrt_address asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by receive_user_vrt_address desc";
            }else{
                this.orderStr = this.orderStr + ",receive_user_vrt_address desc";
            }
        }
    }

    public void orderByCreateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by create_time asc";
            }else{
                this.orderStr = this.orderStr + ",create_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by create_time desc";
            }else{
                this.orderStr = this.orderStr + ",create_time desc";
            }
        }
    }

    public void orderByOrderStatus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by order_status asc";
            }else{
                this.orderStr = this.orderStr + ",order_status asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by order_status desc";
            }else{
                this.orderStr = this.orderStr + ",order_status desc";
            }
        }
    }

    public void orderByOrderResult(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by order_result asc";
            }else{
                this.orderStr = this.orderStr + ",order_result asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by order_result desc";
            }else{
                this.orderStr = this.orderStr + ",order_result desc";
            }
        }
    }

    public void orderByOrderType(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by order_type asc";
            }else{
                this.orderStr = this.orderStr + ",order_type asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by order_type desc";
            }else{
                this.orderStr = this.orderStr + ",order_type desc";
            }
        }
    }

    public void orderByRequestAmount(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by request_amount asc";
            }else{
                this.orderStr = this.orderStr + ",request_amount asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by request_amount desc";
            }else{
                this.orderStr = this.orderStr + ",request_amount desc";
            }
        }
    }

    public void orderByResultAmount(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by result_amount asc";
            }else{
                this.orderStr = this.orderStr + ",result_amount asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by result_amount desc";
            }else{
                this.orderStr = this.orderStr + ",result_amount desc";
            }
        }
    }

    public void orderByChainTaxAmount(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by chain_tax_amount asc";
            }else{
                this.orderStr = this.orderStr + ",chain_tax_amount asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by chain_tax_amount desc";
            }else{
                this.orderStr = this.orderStr + ",chain_tax_amount desc";
            }
        }
    }

    public void orderByPlatfromTaxAmount(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by platfrom_tax_amount asc";
            }else{
                this.orderStr = this.orderStr + ",platfrom_tax_amount asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by platfrom_tax_amount desc";
            }else{
                this.orderStr = this.orderStr + ",platfrom_tax_amount desc";
            }
        }
    }

    public void orderByRequestGameMoney(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by request_game_money asc";
            }else{
                this.orderStr = this.orderStr + ",request_game_money asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by request_game_money desc";
            }else{
                this.orderStr = this.orderStr + ",request_game_money desc";
            }
        }
    }

    public void orderByChannelCode(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by channel_code asc";
            }else{
                this.orderStr = this.orderStr + ",channel_code asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by channel_code desc";
            }else{
                this.orderStr = this.orderStr + ",channel_code desc";
            }
        }
    }

    public void orderByChannelOrderId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by channel_order_id asc";
            }else{
                this.orderStr = this.orderStr + ",channel_order_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by channel_order_id desc";
            }else{
                this.orderStr = this.orderStr + ",channel_order_id desc";
            }
        }
    }
}